import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { resolve } from "path";
import { API_URL } from "./src/configs/yz";

// https://vite.dev/config/
export default defineConfig({
	base: "/san-guo-sha/dist",
	server: {
		host: "0.0.0.0",
		proxy: {
			"/api": API_URL,
		},
	},
	resolve: {
		alias: { "@": resolve(import.meta.dirname, "src") },
		extensions: [".js", ".ts", ".tsx"],
	},
	plugins: [vue()],
});
